#include "Network_Adapters_Info.h"
#include "../Logger/Logger.h"

CNetwork_Adapters_Info::CNetwork_Adapters_Info(void)
{
	m_numberOfAdapters = RetNumberOfInterface();
	sLogMsgf<LogLevel<LOG_LEVEL_LOW>,LineType<LOG_TYPE_NOTIFICATION> >("The number of interfaces is: %ld",m_numberOfAdapters);

	m_adapterInfo = new IP_ADAPTER_INFO[m_numberOfAdapters];
	RetrieveAddresses(m_adapterInfo,m_numberOfAdapters);
}

CNetwork_Adapters_Info::~CNetwork_Adapters_Info(void)
{
	delete[] m_adapterInfo;
}

ULONG CNetwork_Adapters_Info::GetNumberOfAdapters()
{
	return m_numberOfAdapters;
}
